/*
 * BinaryNode.h
 *
 *  Created on: 2013-1-7
 *      Author: EthanHuang
 */

#ifndef BINARYNODE_H_
#define BINARYNODE_H_

#ifndef NULL
#ifdef  __cplusplus
#define NULL    0
#endif
#endif

template <typename ComparableType> class BinaryNode {
public:
	BinaryNode(const ComparableType& elm, BinaryNode* lt, BinaryNode* rt):
		elm(elm), left(lt), right(rt){}
	~BinaryNode(){left=right= NULL;}
	//The actual BinaryNode should hold a element that inherit Comparable interface
	ComparableType elm;
	BinaryNode *left;
	BinaryNode *right;
};
#endif /* BINARYNODE_H_ */
